feat(eap): Add wildcard search support for array string attributes#7770
Open
feat(eap): Add wildcard search support for array string attributes#7770
Conversation
volokluev
reviewed
Feb 25, 2026
volokluev
reviewed
Feb 25, 2026
Member
volokluev
left a comment
There was a problem hiding this comment.
There should be a test of the API actually doing stuff, not just the query generation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Support LIKE/NOT_LIKE operations on TYPE_ARRAY attribute keys in the EAP RPC filter layer. This enables searching for rows where any element in an array attribute matches a wildcard pattern (e.g. `%error%`). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/MPMg6cd5C44sTcO2w7G21dFgr2ROlgzLl2IsE6tXT_M
…ession Address review feedback: instead of adding TYPE_ARRAY handling to the shared attribute_key_to_expression function, build the array extraction expression directly in the filter code where it's needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/pjQ2FphvcZ1pKVc4nPolPe74-FfTxXiVaeKc5q4XyME
Handle TYPE_ARRAY as an early return in comparison filter processing so unsupported operations (EQUALS, IN, etc.) raise immediately instead of producing invalid SQL. Add test for this error path. Co-Authored-By: Claude <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/hhni4eW0BB_sX1hx1k3ocFkKDVAR5tFkoNu10Z-uERw
Add check that the comparison value is a string before using val_str for TYPE_ARRAY LIKE/NOT_LIKE operations. Without this, a non-string value silently defaults to an empty string pattern. Co-Authored-By: Claude <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/H-XBt-koklI88xXMMmB8rnyAuP-g8fRDyDXx9KD7YI4
Add end-to-end tests demonstrating LIKE and NOT_LIKE filters on TYPE_ARRAY attributes, verifying that items with matching array elements are correctly included/excluded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/jlBT3oyR1enG1rD_up18ROqoFcmPcj0MGTgsEhptGec
Update test assertion to check for FunctionCall instead of DangerousRawSQL, matching the rebased implementation that uses JsonPath DSL via attribute_key_to_expression. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/PUQy8YbxsajMsffTOp8W_J6aEJ2PVDa9U_b0bmqdRWU
43cf76e to
08a4591
Compare
volokluev
approved these changes
Feb 27, 2026
Member
volokluev
left a comment
There was a problem hiding this comment.
wow so much simpler.
nit but the PR description is incorrect now, maybe make the robot regenerate it (or delete it)
xurui-c
approved these changes
Feb 27, 2026
Member
xurui-c
left a comment
There was a problem hiding this comment.
Non-blocking, happy to merge as-is. Nit: I feel like the validations can be grouped together to line 228 and reduce the repetition at line 301 and line 322
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TYPE_ARRAYhandling inattribute_key_to_expressionusingDangerousRawSQLto extract string values from the JSONattributes_arraycolumnOP_LIKE/OP_NOT_LIKEfilter translation to supportTYPE_ARRAYkeys viaarrayExistswith a lambdaLIKEon arrays:arrayExists(x -> like(x, pattern), array)— true if any element matchesNOT_LIKEon arrays:NOT(arrayExists(x -> like(x, pattern), array))— true if no element matchesignore_caseflag (switcheslike→ilike)Test plan
attribute_key_to_expressionwithTYPE_ARRAY(expression shape, alias, backtick escaping)🤖 Generated with Claude Code
Agent transcript: https://claudescope.sentry.dev/share/CSlg1g-5P5OFoOJQo-B83K2SA1OibDF7tSh1ralLTgs